package cn.edu.xmu.oomall.customer.model.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author Jiawei Zheng
 * @date 2021-12-09
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AddressVo {

    @NotNull
    @Min(1)
    private Long regionId;

    @NotBlank
    private String detail;

    @NotBlank
    private String consignee;

    @NotBlank
    @Pattern(regexp = "1[3|4|5|7|8][0-9]\\d{8}")
    private String mobile;
}
